package cate.game.role.show.heroskin;

import cate.common.table.show.heroskin.row.HeroSkinBaseRow;
import cate.common.table.show.heroskin.row.HeroSkinLevelRow;
import cate.game.GameBody;
import cate.game.role.show.ShowItemBase;
import com.fasterxml.jackson.annotation.JsonIgnore;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("英雄皮肤")
public class HeroSkin extends ShowItemBase {

    @NoteField("等级")
    public int level;

    public HeroSkin() {}

    public HeroSkin(int tid, long valiedTime) {
        super(tid, valiedTime);
        this.level = 0;
    }

    @JsonIgnore
    public HeroSkinBaseRow getBaseRow(GameBody game) {
        return game.table.heroSkin.base.get(tid);
    }

    @JsonIgnore
    public HeroSkinLevelRow getLevelRow(GameBody game){
        return game.table.heroSkin.level.getLevelRow(tid, level);
    }

    @JsonIgnore
    public HeroSkinLevelRow getNextLevelRow(GameBody game){
        return game.table.heroSkin.level.getLevelRow(tid, level + 1);
    }
}
